package com.itheima.mybytestream;

import java.io.FileOutputStream;
import java.io.IOException;

public class Test1 {
    public static void main(String[] args) throws IOException {
        //进行写入数据
        FileOutputStream fos = new FileOutputStream("myio\\a.txt");
        //写入
//        fos.write(97);
//        fos.write(98);
        byte[] bytes = {97, 98, 99, 100};
        fos.write(bytes, 1, 3);
        //释放资源
        fos.close();
    }
}
